/*
 * profusion.h
 *
 *  Created on: 17-03-2011
 *      Author: Jakub Bartodziej <jakub.bartodziej@students.mimuw.edu.pl>
 */

#ifndef PROFUSION_H_
#define PROFUSION_H_

#include <time.h>
#include <gmp.h>

typedef struct time_span {
	struct timespec start, end;
	unsigned long size;
	mpz_t size_scale, time_scale;
} time_span;

extern void time_span_init(time_span* pts);

extern void time_span_deinit(time_span* pts);

extern void time_span_start(time_span* pts);

extern void time_span_end(time_span* pts);

extern void time_span_set_size(time_span* pts, unsigned long size);

extern void time_span_scale_size(time_span* pts, unsigned long scalar);

extern void time_span_scale_time(time_span* pts, unsigned long scalar);

extern double time_span_time_to_double(time_span* pts);

extern double time_span_bandwidth_to_double(time_span* pts);

#endif /* PROFUSION_H_ */
